package demo1;

public class test {



    public static void main(String[] args) {
        Cycle cycle=new Cycle();
        Flower flower=new Flower();

        //抽象类不能实例化，但是可以向上转型
        Shape[] shapes={cycle,flower,cycle,flower,flower};
        for (Shape shape:shapes) {
            shape.draw();

        }
    }

}
